package com.kunya.product.dao.active;

import com.kunya.product.po.ProductSeckill;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

public interface ProductSeckillMapper {
    int deleteByPrimaryKey(@Param("seckillId") Long seckillId,@Param("table_prefix") String tablePrefix);

    int insert(@Param("record") ProductSeckill record,@Param("table_prefix") String tablePrefix);

    int insertSelective(@Param("record") ProductSeckill record,@Param("table_prefix") String tablePrefix);

    ProductSeckill selectByPrimaryKey(@Param("seckillId") Long seckillId,@Param("table_prefix") String tablePrefix);

    int updateByPrimaryKeySelective(@Param("record") ProductSeckill record,@Param("table_prefix") String tablePrefix);

    int updateByPrimaryKey(@Param("record") ProductSeckill record,@Param("table_prefix") String tablePrefix);
    /**
     * @author zp
     * @Description: 并发量不大情况下秒杀减库存操作
     * @param
     * @date 2018/7/19 17:52
     */
    int updateStock(@Param("seckillId") Long seckillId, @Param("nowTime") Date nowTime);
}